module(
    name = "rules_qt",
    version = "0.0.5",
    compatibility_level = 1,
)

bazel_dep(name = "bazel_skylib", version = "1.8.2")
bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "rules_cc", version = "0.2.11")
bazel_dep(name = "rules_shell", version = "0.6.1")

qt = use_extension("//extension:qt.bzl", "fetch")
qt.install(
    name = "qt_linux_x86_64",
    build_file = "//extension:qt/6.8.3/linux_x86_64.BUILD",
    os = "linux",
    version = "6.8.3",
)
qt.install(
    name = "qt_windows_x86_64",
    build_file = "@rules_qt//extension:qt/6.8.3/windows_x86_64.BUILD",
    os = "windows",
    version = "6.8.3",
    windows_architecture = "win64_msvc2022",
)
qt.install(
    name = "qt_mac_aarch64",
    build_file = "//extension:qt/6.8.3/mac_aarch64.BUILD",
    os = "macos",
    version = "6.8.3",
)
use_repo(qt, "qt_linux_x86_64", "qt_mac_aarch64", "qt_windows_x86_64")

register_toolchains(
    "@rules_qt//tools:all",
    dev_dependency = True,
)
